-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[rb] create user-friendly method for enabling bidi #14284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
CI Failure Feedback 🧐(Checks updated until commit ceaa988)
✨ CI feedback usage guide:The CI feedback tool (
In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR: where Configuration options
See more information about the |
User description
This matches what is being done in other languages (#13991)
In general it isn't user friendly that that
web_socket_urlvalue to the driver is a boolean, but the response is a string. This provides a more obvious name for users to set the property.This allows Options class to use
#enable_bidi!and#bidi?as the booleans for the options.Capabilities will return
driver.capabilities[:web_socket_url]with either nil or the value of the url.We ok with my use of bang and predicate here?
PR Type
Enhancement, Tests
Description
enable_bidi!method toSelenium::WebDriver::Optionsto setweb_socket_urlto true.bidi?method to check ifweb_socket_urlis enabled.web_socket_urlandbidi?method behavior.enable_bidi!method, verifying setting and querying of bidi option.Changes walkthrough 📝
options.rb
Add methods to enable and check bidi in optionsrb/lib/selenium/webdriver/common/options.rb
enable_bidi!method to setweb_socket_urlto true.bidi?method to check ifweb_socket_urlis enabled.options_spec.rb
Add integration test for enabling bidi in Chrome optionsrb/spec/integration/selenium/webdriver/chrome/options_spec.rb
web_socket_urlandbidi?method behavior.options_spec.rb
Add unit test for enable_bidi! method in Chrome optionsrb/spec/unit/selenium/webdriver/chrome/options_spec.rb
enable_bidi!method.